package cloud.simple.ui.service;

import cloud.simple.ui.hystrix.UserServiceHystrix;
import cloud.simple.ui.model.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * Created by feng on 16/9/20.
 */
@FeignClient(value = "cloud-simple-service", fallback = UserServiceHystrix.class)
public interface UserService {

    @RequestMapping(value = "/users", method = RequestMethod.GET)
    List<User> searchAll();
}
